// 导入axios实例
import httpRequest from '../request/index';
// sha256加密
import sha256 from 'crypto-js/sha256';

// 获取真实播放地址
export function getRealPlaylink(vcate, url) {
    let params = `${vcate}${url}XpFaEDYkQH`;
    return httpRequest({
        url: '/playlink',
        method: 'post',
        data: {
            vcate: vcate,
            url: url,
            time: Math.round(new Date().getTime() / 1000),
            sign: sha256(params).toString().substring(0, 15),
        },
    });
}
